package com.witmore.skyline.db.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 业务与项目的关联关系表
 * </p>
 *
 * @author 豆子高
 * @since 2025-02-24
 */
@Builder
@Getter
@Setter
@TableName("skyline_project_business_ref")
public class ProjectBusinessRefDO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主表id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 1设备 2摄像头 3管理员
     */
    @TableField("type")
    private Integer type;

    /**
     * 设备类别的 就是 skyline_device表id；
     * 摄像头类别的 就是skyline_camera表id；
     * 管理员类别的 就是skyline_admin 表id
     */
    @TableField("skyline_business_id")
    private Integer skylineBusinessId;

    /**
     * skyline_org表id
     */
    @TableField("org_id")
    private Integer orgId;

    /**
     * skyline_project表id
     */
    @TableField("project_id")
    private Integer projectId;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

}